home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
c
/
tcxl551.zip
/
TCXL_INC.EXE
/
lha
/
INC
/
TCXLMNU.H
< prev
next >
Wrap
Text File
|
1990-10-01
|
13KB
|
204 lines
/*=====[ The TesSeRact(TM) CXL User Interface Development System ]======*
| Copyright (c) 1987-1990, Innovative Data Concepts. All Rights Reserved
|
| This Library is part of IDC's TesSeRact Development Tools product
| line. For information about other IDC products, call 1-215-884-3373.
*----------------------------------------------------------------------*
| <TCXLmnu.h> : Public definitions and prototypes for TCXL Menu system
| (User level).
*----------------------------------------------------------------------*
| PGS : $Id: tcxlmnu.h 5.51 90/10/01 00:00:00 MLM Release Locker: MLM $
| $Log: tcxlmnu.h $
| Revision 5.51 90/10/01 00:00:00 MLM
| TCXL 5.51
|
*======================================================================*/
#ifndef _TCXLmnu_
# define _TCXLmnu_ 1
# ifndef _TCXLwnd_
# include <TCXLwin.h> /* window definitions */
# endif
# ifndef _TCXLkey_
# include <TCXLkey.h> /* keyboard definitions */
# endif
/*- MnuEnd() menu type -------*/
#define MNU_HOR 0x01 /* horizontal */
#define MNU_VER 0x02 /* vertical */
#define MNU_OMN 0x07 /* omnidirectional */
#define MNU_PUL 0x08 /* pull-down */
#define MNU_NQS 0x10 /* disable quick selection */
#define MNU_SAV 0x20 /* save last bar position */
#define MNU_DSP 0x40 /* always display */
#define MNU_USE 0x80 /* use current window */
/*- MnuItm() feature mask ----*/
#define ITM_PUL 0x01 /* pull-down attached */
#define ITM_NSL 0x02 /* not selectable */
#define ITM_AFT 0x04 /* close after select */
#define ITM_ALL 0x08 /* close all when selected */
#define ITM_BEF 0x10 /* close before select */
#define ITM_DSP 0x20 /* redisplay */
/*------------------[ Data objects and access macros ]------------------*/
TYP struct Idf IdfT, *IdfP; /* object, pointer types */
TYP struct Mctl MctlT;
TYP struct Mdf MdfT, *MdfP;
struct Mctl /*-[ Menu-control object ]----------*/
{ MdfP mtop; /* 00|00 : top menu */
MdfP mcur; /* 02|04 : current menu */
IntT mmnu; /* 04|08 : menu level */
IntT mitm; /* 06|0A : item level */
}; /* 08|0C ]--------------------------*/
GBL MctlT CDC _MnuCtl; /*- global menu-control object -----------*/
#define MctlTop (_MnuCtl.mtop) /* top menu */
#define MctlCur (_MnuCtl.mcur) /* current menu */
#define MctlMnu (_MnuCtl.mmnu) /* menu level */
#define MctlItm (_MnuCtl.mitm) /* item level */
struct Mdf /*-[ Menu-definition object ]----*/
{ MdfP mprv; /* 00|00 : previous menu */
MdfP mnxt; /* 02|04 : next menu */
MdfP mpar; /* 04|08 : parent menu */
IdfP mtop; /* 06|0C : head item */
IdfP mcur; /* 08|10 : current item */
VfvCP mopn; /* 0A|14 : post-open function */
TagT mtag; /* 0C|18 : selected tag ID */
VposT mbeg; /* 0E|1A : start position */
VposT mend; /* 10|1C : end position */
BoxT mfrm; /* 12|1E : border */
AtrT mwat; /* 14|20 : window attr */
BytT mtyp; /* 15|21 : type mask */
BytT mwid; /* 16|22 : bar width */
BytT mofs; /* 17|23 : text offset */
AtrT mtat; /* 18|24 : text attr */
AtrT msat; /* 19|25 : select char attr */
AtrT mnat; /* 1A|26 : non-select attr */
AtrT mbat; /* 1B|27 : bar attribute */
}; /* 1C|28 ]-----------------------*/
#define MdfPrv(m) ((m)->mprv) /* previous MdfT */
#define MdfNxt(m) ((m)->mnxt) /* next MdfT */
#define MdfPar(m) ((m)->mpar) /* parent MdfT */
#define MdfTop(m) ((m)->mtop) /* head IdfT */
#define MdfCur(m) ((m)->mcur) /* current IdfT */
#define MdfOpn(m) ((m)->mopn) /* post-open func */
#define MdfTag(m) ((m)->mtag) /* selected tag ID */
#define MdfBeg(m) ((m)->mbeg) /* start position */
#define MdfBegW(m) (VposW(MdfBeg(m))) /* word */
#define MdfBegC(m) (VposC(MdfBeg(m))) /* col */
#define MdfBegR(m) (VposR(MdfBeg(m))) /* row */
#define MdfEnd(m) ((m)->mend) /* end position */
#define MdfEndW(m) (VposW(MdfEnd(m))) /* word */
#define MdfEndC(m) (VposC(MdfEnd(m))) /* col */
#define MdfEndR(m) (VposR(MdfEnd(m))) /* row */
#define MdfFrm(m) ((m)->mfrm) /* border */
#define MdfFrmT(m) (BoxTyp(MdfFrm(m))) /* type */
#define MdfFrmA(m) (BoxAtr(MdfFrm(m))) /* attr */
#define MdfWat(m) ((m)->mwat) /* window attr */
#define MdfTyp(m) ((m)->mtyp) /* type mask */
#define MdfHor(m) (0 != (MdfTyp(m) & MNU_HOR)) /* horizontal */
#define MdfVer(m) (0 != (MdfTyp(m) & MNU_VER)) /* vertical */
#define MdfOmn(m) (0 != (MdfTyp(m) & MNU_OMN)) /* omnidirectional*/
#define MdfPul(m) (0 != (MdfTyp(m) & MNU_PUL)) /* pull-down */
#define MdfNqs(m) (0 != (MdfTyp(m) & MNU_NQS)) /* no quick select*/
#define MdfSav(m) (0 != (MdfTyp(m) & MNU_SAV)) /* save bar pos */
#define MdfDsp(m) (0 != (MdfTyp(m) & MNU_DSP)) /* always display */
#define MdfUse(m) (0 != (MdfTyp(m) & MNU_USE)) /* use current */
#define MdfWid(m) ((m)->mwid) /* bar width */
#define MdfOfs(m) ((m)->mofs) /* text offset */
#define MdfTat(m) ((m)->mtat) /* text attribute */
#define MdfSat(m) ((m)->msat) /* select char attr */
#define MdfNat(m) ((m)->mnat) /* non-select attr */
#define MdfBat(m) ((m)->mbat) /* bar attribute */
struct Idf /*-[ Item-definition object ]----*/
{ IdfP iprv; /* 00|00 : previous IdfT */
IdfP inxt; /* 02|04 : next IdfT */
MdfP isub; /* 04|08 : submenu MdfT */
ChrP istr; /* 06|0C : selection text */
ChrP itxt; /* 08|10 : description text */
VfvCP isel; /* 0A|14 : "select" function */
VfvCP ibef; /* 0C|18 : "before" function */
VfvCP iaft; /* 0E|1C : "after" function */
KeyT ikey; /* 10|20 : hot key */
TagT itag; /* 12|22 : tag ID */
TagT ihlp; /* 14|24 : help tag */
VposT ispo; /* 16|26 : select text position */
VposT idpo; /* 18|28 : description position */
AtrT idat; /* 1A|2A : description attribute */
BytT ichr; /* 1B|2B : quick select char */
BytT imsk; /* 1C|2C : feature mask */
BytT ilen; /* 1D|2D : selection-text length */
VposT icpo; /* 1E|2E : center position */
}; /* 20|30 ]-----------------------*/
#define IdfPrv(i) ((i)->iprv) /* previous IdfT */
#define IdfNxt(i) ((i)->inxt)